@if (data?.toggle) {
  <mat-button-toggle-group
    class="mb-5"
    (change)="onChange($event)"
    name="switchChart"
    aria-label="switch chart"
  >
    @for (item of data.toggle; track item) {
      <mat-button-toggle value="{{ item.value }}">
        @if (item.icon) {
          <app-icon [content]="item.icon" />
        }
        {{ item.label }}
      </mat-button-toggle>
    }
  </mat-button-toggle-group>
}
<div
  #echarts
  class="chart rounded-md p-5 box-border min-w-[400px] min-h-[400px]"
  [ngStyle]="style"
></div>
